unit UfrmStockView;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBGridEhGrouping, DB, ADODB, GridsEh, DBGridEh, ExtCtrls,
  RzPanel, RzButton;

type
  TfrmStockView = class(TForm)
    RzToolbar1: TRzToolbar;
    DBGridEh1: TDBGridEh;
    qryStockView: TADOQuery;
    dsStockView: TDataSource;
    RzStatusBar1: TRzStatusBar;
    RzToolButton1: TRzToolButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure RzToolButton1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmStockView: TfrmStockView;

implementation

uses UdataModel;

{$R *.dfm}

procedure TfrmStockView.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  Action:=caFree;
end;

procedure TfrmStockView.RzToolButton1Click(Sender: TObject);
begin
   qryStockView.Active:=false;
   qryStockView.Active:=true;
end;

procedure TfrmStockView.FormShow(Sender: TObject);
begin
   qryStockView.Active:=True;
end;

end.
